layui.use(['form', 'admin', 'ax', 'laydate', 'upload', 'xmSelect'], function () {
        var $ = layui.jquery;
        var $ax = layui.ax;
        let form = layui.form;
        $(function () {
            ConfigList.loadData()
        });
        //表单提交事件
        form.on('submit(btnSubmit)', function (data) {
            var ajax = new $ax(Changein.ctxPath + "/miniApp/config/update", function (data) {
                if (isResultOK(data)) {
                    Changein.success("提交成功！");
                    window.location.href = Changein.ctxPath + '/miniApp/config'
                } else {
                    Changein.error(data.message)
                }
            }, function (data) {
                Changein.error("提交失败！" + data.responseJSON.message)
            });
            ajax.set(data.field);
            ajax.start();
            return false;
        });
        form.render()
    }
)
var ConfigList = {}
ConfigList.loadData = function () {
    layui.use(['ax', 'form', 'func'], function () {
        var $ax = layui.ax;
        var $ = layui.jquery;
        let form = layui.form;
        var configAx = new $ax(Changein.ctxPath + "/miniApp/config")
        let configRes = configAx.start();
        if (!isResultOK(configRes)) {
            layer.msg("加载配置失败")
        }
        form.val('form', configRes.data);
        form.render()
    })
}